package com.tsd.system.service;

import com.tsd.core.vo.PageBean;
import com.tsd.system.entity.SysRoleResource;
import com.tsd.system.entity.SysRoleResourceExt;
import com.tsd.system.entity.SysUser;

import java.util.List;
import java.util.Map;


/**
 * 描述：SysRoleResource服务实现层接口
 *
 * @author Hillpool
 * @date 2019/03/12 12:20:51
 */
public interface SysRoleResourceService {

    /**
     * 描述：根据id获取SysRoleResource
     *
     * @param id
     */
    SysRoleResource getSysRoleResourceById(Long id) throws Exception;

    /**
     * 描述：保存或更新SysRoleResource
     *
     * @param record
     * @param opUser
     */
    void saveSysRoleResource(SysRoleResource record, SysUser sysUser) throws Exception;

    /**
     * 描述：根据id删除SysRoleResource
     *
     * @param id
     */
    void deleteSysRoleResource(Long id) throws Exception;

    /**
     * 描述：根据params分页查询SysRoleResource
     *
     * @param params
     * @param page
     */
    List<SysRoleResource> findSysRoleResources(Map<String, Object> params, PageBean page) throws Exception;

    void deleteSysRoleResource(SysUser opUser, String roleId, List<String> resourceIdList) throws Exception;

    void saveSysResourceList2Role(SysUser opUser, String roleId, List<String> resourceIdList, List<SysRoleResource> resourceList) throws Exception;

    List<SysRoleResource> findRoleResourcesByRoleId(String roleId) throws Exception;

    List<SysRoleResourceExt> queryValidByRoleList(List<String> roleList) throws Exception;
}
